Software Development
Python Conditional Statements and Loops
Conditional Statements & Loops: Advanced Operations Using for Loops in Python
Conditional Statements & Loops: If-else Control Structures in Python
Conditional Statements & Loops: The Basics of for Loops in Python
Conditional Statements & Loops: While Loops in Python

Conditional Statements & Loops: Advanced Operations Using for Loops in Python

Course Number:
it_pycslpdj_03_enus
Lesson Objectives

Conditional Statements & Loops: Advanced Operations Using for Loops in Python

  • discover the key concepts covered in this course
  • terminate a for loop when a specific condition is met using the break statement
  • recognize how the break statement affects the code in the else block of a for loop
  • skip an iteration of a for loop when a specific condition is met using the continue statement
  • use the continue statement along with the break statement within the same for loop
  • convey the fact that no action is performed under specific conditions by using the pass statement
  • create a list out of the contents of another list using a comprehension
  • specify conditions in list comprehensions in order to filter elements used in the source list and to define the values in the newly created list
  • write for loops that make use of the break and continue statements to control flow and use comprehensions to generate a list

Overview/Description

Explore how iterating over elements using for loops can be controlled using the break and continue statements. Creating sequences from other sequences using comprehensions is also covered.



Target

Prerequisites: none

Conditional Statements & Loops: If-else Control Structures in Python

Course Number:
it_pycslpdj_01_enus
Lesson Objectives

Conditional Statements & Loops: If-else Control Structures in Python

  • discover the key concepts covered in this course
  • identify how conditions in Python work
  • evaluate conditions involving primitive data types using if statements
  • evaluate conditions involving complex data types using if statements
  • evaluate multiple conditions for the purpose of decision making
  • evaluate multiple conditions for the purpose of decision making using the nested control structures
  • identify how to use the if-else statement to make decisions involving complex data types such as lists, tuples, and dictionaries
  • recall how to convert an integer to a float, and a float or an integer to a string and vice-versa
  • recall how to convert a primitive datatype to a complex datatype and to convert between various complex datatypes
  • recall how to convert between various complex datatypes and view base conversions using the Python built-in functions
  • implement basic concepts into some real programming such as conversions between datatypes and some Python built-in methods
  • solve various programming problems using some Python built-in methods
  • solve various programming problems using if-elif-else statements and nested if-else statements
  • solve coding problems using a combination of the different forms of if-else statements
  • recall details related to the order of precedence in Python and apply if-else statements to solve basic programming problems

Overview/Description

Explore the implementations of the order of precedence of operators, using if-elif-else statements to evaluate multiple conditions, and conversions between various datatypes in Python.



Target

Prerequisites: none

Conditional Statements & Loops: The Basics of for Loops in Python

Course Number:
it_pycslpdj_02_enus
Lesson Objectives

Conditional Statements & Loops: The Basics of for Loops in Python

  • discover the key concepts covered in this course
  • use for loops to process the elements in a list and the characters in a string
  • code for loops to iterate over values in a tuple and the keys and values in a dictionary
  • recognize the function of associating an else block with a Python for loop
  • include if-else statements and other for loops within a for loop
  • generate a sequence of consecutive integers with the range function
  • define the interval in a sequence of increasing and decreasing integers using the range function
  • use the range function to iterate over a large range of values and apply it within nested for loops
  • write for loops in order to iterate over 1-dimensional and 2-dimensional sequences

Overview/Description

Loops are one way to perform the same operations repeatedly in a program. For loops are the control structure to use when the repeated operations are performed on a sequence such as a list or a tuple. Explore the different ways to iterate over a sequence using for loops.



Target

Prerequisites: none

Conditional Statements & Loops: While Loops in Python

Course Number:
it_pycslpdj_04_enus
Lesson Objectives

Conditional Statements & Loops: While Loops in Python

  • discover the key concepts covered in this course
  • implement a basic while loop and recognize what conditions can cause it to become an infinite loop
  • use while loops to carry out actions while evaluating expressions based on numerical and string data
  • define while loops whose iterations depend on user input data
  • recall the syntax for defining while loops within a single line
  • iterate over a list of elements using while loops
  • iterate over multiple lists and tuples using while loops
  • identify when it is appropriate to use the break keyword to stop a while loop
  • use the break statement in multiple scenarios to break out of a while loop and recognize the use of the pass keyword within such loops
  • skip steps in individual iterations of a while loop using the continue statement
  • compare while loops and for loops and implement a while loop which terminates only when the user enters a specific input

Overview/Description

While loops are one way to keep repeating a set of actions until a specific condition is met. Explore the use of while loops, considerations when implementing while loops, and use cases for while loops and for loops.



Target

Prerequisites: none

Close Chat Live